var t = getApp();

Component({
    properties: {
        zIndex: {
            type: Number,
            value: 2
        },
        show: {
            type: Boolean,
            value: !1
        },
        qrcode: {
            type: String,
            value: null
        },
        online: {
            type: String,
            value: ""
        },
        customer_open: {
            type: String || Number,
            value: null
        },
        tel: {
            type: String,
            value: null
        },
        goods_id: {
            type: String,
            value: null
        }
    },
    data: {},
    methods: {
        gotoChat: function(e) {
            var o = this.data.online + "&goods_id=" + this.data.goods_id;
            console.log(o), wx.navigateTo({
                url: o,
                fail: function(e) {
                    t.tips("客服路由出错");
                }
            });
        },
        closePopup: function() {
            this.triggerEvent("closed"), this.setData({
                show: !1
            });
        },
        phoneCall: function() {
            this.data.tel && wx.makePhoneCall({
                phoneNumber: this.data.tel
            });
        }
    }
});